{#**
*
* 功能描述（列表模板）
*
* @author suoya <jlusuoya@gmail.com>
* @version 1
*#}
{#include file="header.tpl" title="title" active="dely" #}
{#include file="define.tpl" scope=parent#}
<div class="content middle">
    <div class="ui breadcrumb">
        <a class="section" href="index.php">主页</a>
        <i class="right"></i>
        <a class="active section">配送管理</a>
    </div>
    {#include file="search_bar.tpl" s_basic = ['status'=>[0,'配送状态', $g_dely_status]] s_vdate=['d_start'=>'最早送货', 'd_end'=>'最晚送货'] s_keys=['area'=>'配送区域', 'address' => '详细地址', 'id'=>'订单号后缀', 'consignee'=>'收货人', 'mobile_to'=>'收货电话', 'mobile_from'=>'订货电话']#}
    <table class="ui table segment">
        <thead>
            <tr>
                <th>序号</th>
                <th>配送人</th>
                <th>订单号</th>
                <th>配送时间段</th>
                <th>收货人</th>
                <th>收货电话</th>
                <th>配送地址</th>
                <th>订货账号</th>
                <th>订货电话</th>
                <th style="width:6em">配送状态</th>
                <th>出发时间</th>
                <th>送达时间</th>
                <th>金额</th>
                <th>订单留言</th>
                <th>备注</th>
            </tr>
        </thead>
        <tbody>
            {#foreach $listdata as $k => $item#}
                <tr>
                    <td>{#$k+1#}
                    <td>{#if $item['dely_adm'] != 0#}ID {#$item['dely_adm']#}{#/if#}</td>
                    <td><a href="index.php?action=dely.detail&id={#$item['id']#}">{#$item['id']+$orderid_base#}</a></td>
                    <td>{#$item['delivery_time']#}</td>
                    <td>{#$item['consignee']#}</td>
                    <td>{#$item['mobile_to']#}</td>
                    <td>{#$item['area']#}{#$item['address']#}</td>
                    <td><a href="#" onclick="return showuser({#$item['userid']#})">ID {#$item['userid']#}</a></td>
                    <td>{#$item['mobile_from']#}</td>
                    <td>
                        <select onchange="ajax_value(this, 'index.php?action=dely.setstatus&id={#$item['id']#}&status=')">
                            {#foreach $g_dely_status as $k => $v#}
                                <option value="{#$k#}" {#if $item['status'] == $k#}selected="selected"{#/if#}>{#$v#}</option>
                            {#/foreach#}
                        </select>
                    </td>
                    <td>{#$item['starttime']#}</td>
                    <td>{#$item['finishtime']#}</td>
                    <td>{#$item['amount']#}</td>
                    <td>{#$item['message']#}</td>
                    <td>{#$item['note']#}</td>
                </tr>
            {#/foreach#}
        </tbody>
        <tfoot>
            <tr>
                <th colspan="15" style="font-style: normal;">
                    {#include file="paging_bar.tpl"#}
                </th>
            </tr>
        </tfoot>
    </table>
</div>
{#include file="footer.tpl" #}

